<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>接口查询时间监控（鸡你太美版）</title>
  <style>
    body {
      font-family: 'Microsoft YaHei', sans-serif;
      width: 400px;
      height: 600px;
      margin: 0;
      padding: 0;
      overflow: hidden;
      display: flex;
      flex-direction: column;
    }
    
    .header {
      background-color: #4285f4;
      color: white;
      padding: 10px 15px;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    
    .header h1 {
      margin: 0;
      font-size: 18px;
      display: flex;
      align-items: center;
      gap: 10px;
    }
    
    .header h1 img {
      width: 24px;
      height: 24px;
      border-radius: 4px;
    }
    
    .controls {
      display: flex;
      gap: 10px;
    }
    
    .btn {
      background: none;
      border: none;
      color: white;
      cursor: pointer;
      font-size: 14px;
      padding: 5px 10px;
      border-radius: 4px;
    }
    
    .btn:hover {
      background-color: rgba(255, 255, 255, 0.2);
    }
    
    .content {
      flex: 1;
      overflow-y: auto;
      padding: 10px;
    }
    
    .api-list {
      list-style: none;
      padding: 0;
      margin: 0;
    }
    
    .api-item {
      border-bottom: 1px solid #eee;
      padding: 10px;
      display: flex;
      flex-direction: column;
      gap: 5px;
    }
    
    .api-url {
      font-size: 14px;
      word-break: normal;
      color: #333;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 360px;
      cursor: pointer;
    }
    
    .api-url.expanded {
      white-space: normal;
      word-break: break-all;
    }
    
    .api-details {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    
    .api-time {
      font-weight: bold;
      font-size: 16px;
    }
    
    .api-status {
      padding: 3px 8px;
      border-radius: 12px;
      font-size: 12px;
    }
    
    .status-normal {
      background-color: #e6f4ea;
      color: #137333;
    }
    
    .status-timeout {
      background-color: #fce8e6;
      color: #c5221f;
    }
    
    .no-data {
      text-align: center;
      color: #757575;
      margin-top: 20px;
    }
    
    .footer {
      padding: 10px;
      text-align: center;
      font-size: 12px;
      color: #757575;
      border-top: 1px solid #eee;
    }
  </style>
</head>
<body>
  <div class="header">
    <h1><img src="images/jntm.jpg" alt="logo">接口监控(鸡你太美版)</h1>
    <div class="controls">
      <button id="pauseBtn" class="btn">暂停</button>
      <button id="clearBtn" class="btn">清空</button>
    </div>
  </div>
  
  <div class="content">
    <ul id="apiList" class="api-list">
      <!-- 数据将通过JavaScript动态添加 -->
    </ul>
    <div id="noData" class="no-data">暂无监控数据</div>
  </div>
  
  <div class="footer">
    <div class="threshold-setting">
      <label for="timeoutThreshold">超时阈值:</label>
      <input type="number" id="timeoutThreshold" min="100" value="3000" step="100">
      <span>ms</span>
      <button id="saveThresholdBtn" class="save-btn">保存</button>
    </div>
  </div>

  <script src="popup.js"></script>
</body>
</html>